<?php
if (isset($_SESSION['player_id'])) {
$query = "SELECT `role_id`, `team_id`
				FROM `players`
				WHERE `id`='{$_SESSION['player_id']}'
				LIMIT 1";
	$sql = mysql_query($query) or die(mysql_error());
	if (mysql_num_rows($sql)==1)
	{
	   $cap=mysql_fetch_assoc($sql);
       if ($cap['role_id']==1 && $cap['team_id']!=''){
	       //echo 'Вы можете редактировать данные своей команды!';

?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 <tr bgcolor="#000000"> 
  <td width="100%"> 
   <table border="0" width="100%">
    <tr bgcolor="#333333"> 
     <td valign="bottom" colspan="2" > 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <tr valign="middle"> 
        <td align="left" bgcolor="#333333">
         <a href="index.php?section=team&mode=main">Обзор</a> |
         <a href="index.php?section=team&mode=application">Заявки на игры</a> |
         <a href="index.php?section=team&mode=invites">Приглашения</a> |
         <a href="index.php?section=team&mode=delete">Распустить команду</a> 
        </td>
        </tr>
      </table>
     </td>
    </tr>
   </table>
  </td>
 </tr>
</table>
<?php
switch ($_GET['mode']) {
		case "main": 
		require ("cap_main.php");
		break;
		case "application": 
		require ("cap_application.php");
		break;
		case "invites": 
		require ("cap_invites.php");
		break;
        case "delete": 
		require ("cap_delete.php");
		break;
		default:
		require ("cap_main.php");}

}
}
}
else print ('Время вашей сессии истекло!');

?>